<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@include file="header.jsp" %>
<%
String connectionUrl = request.getContextPath()+"/Connection";
%>
<form action="<%=connectionUrl %>" method="POST" class="pure-form pure-form-aligned">
	<fieldset>
		<legend>DB Connection</legend>

<%@include file="error.jsp" %>
	
		<div class="pure-control-group">
			<label for="txtJdbcUrl">JDBC Url :</label>
			<input type="text" name="jdbcUrl" id="txtJdbcUrl" size="50"
				value="<%=request.getParameter("jdbcUrl")!=null?request.getParameter("jdbcUrl"):application.getInitParameter("DefaultJdbcUrl")%>"/>
		</div>
		<div class="pure-control-group">
			<label for="txtUsername">Username :</label>
			<input type="text" name="username" id="txtUsername" 
				value="<%=request.getParameter("username")!=null?request.getParameter("username"):application.getInitParameter("DefaultJdbcUser")%>"/>
		</div>
		<div class="pure-control-group">
			<label for="txtPassword">Password :</label>
			<input type="password" name="password" id="txtPassword" value="<%=request.getParameter("username")!=null?"":application.getInitParameter("DefaultJdbcPassword")%>"/>
		</div>
		<div class="pure-controls">
			<input type="reset" class="pure-button" />
			<input type="submit" value="Connection" class="pure-button pure-button-primary" />
		</div>
	</fieldset>
</form>
<%@include file="footer.jsp" %>